package com.goldwind.user.dao;

import com.goldwind.pojo.User;
import com.goldwind.pojo.Channel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    List<User> selectAll();

    User selectByEmail(@Param("email") String email);

    int updateUser(User user);

    List<Channel> selectChannel(@Param("userId") int userId);

    int createChannel(Channel channel);

    int selectNewChannel(@Param("userId")int userId);

    int concat(@Param("userId")int userId,@Param("cId")int cId);

    List<Channel> findChannel(@Param("sort")String sort);

    List<Channel> suggestChannel();

    List<Channel> loveChannel(@Param("userId")int userId);

    List<Channel> searchChannel(@Param("name")String name);

    List<Integer> addedChannels(@Param("userId")int userId);
}
